# leave these lines alone
.SUFFIXES: .erl .beam .yrl

.erl.beam:
	erlc -W $<

HOSTNAME = $(shell hostname)

#ERL = erl -boot start_sasl -config system -setcookie ifriend 
#WERL = werl -boot start_sasl -config system -setcookie ifriend


#ERL = erl -boot start_sasl -setcookie ifriend
#WERL = werl -boot start_sasl -setcookie ifriend

ERL = erl -boot start_clean -setcookie ifriend
WERL = werl -boot start_clean -setcookie ifriend
all: compile

compile: ${MODS:%=%.beam} 
	erl -make	

## run an application from the makefile

server:compile
#	${ERL} -pa ../lib -sname  ${HOSTNAME}iserver -s app_meta_server start
 
	${ERL} -pa ../lib -sname  iserver -s app_ifriend_server start
	
# remove all the code

clean:	
	rm -rf *.beam erl_crash.dump

